<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateKdMaterialGalleriesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('kd_material_galleries', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->comment('创建者');
            $table->integer('material_id')->comment('材料id');
            $table->string('title')->comment('标题');
            $table->string('thumb')->comment('展示图片');
            $table->string('color_number')->comment('色号');
            $table->integer('sort')->default(0)->comment('排序');
            $table->tinyInteger('is_show')->default(1)->comment('1显示,-1隐藏');
            $table->tinyInteger('is_new')->default(0)->comment('1新品,0旧品');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('kd_material_galleries');
    }
}
